-
Notifications
You must be signed in to change notification settings - Fork 635
✨ Skip AWSCluster reconciliation when owner Cluster is being deleted #5677
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
9d3d37c
to
accf03e
Compare
/test pull-cluster-api-provider-aws-e2e-blocking |
accf03e
to
1038d21
Compare
Is this the recommended way of dealing with the reconciliation of the ProviderCluster when the owning Cluster is being deleted? What are other providers doing in this occasion? I had a quick look at CAPV and CAPG but they don't seem to be doing that: |
^ cc. @chrischdi |
I agree with @damdo on this. From core CAPI perspective this is not defined clearly I think (did not find something clearly about this in the InfraCluster contract xref). But it also does not mention the deletion should be the way of the issue description. So I'd conclude it should not be like that. From my point of view: the infracluster provider should take care of keeping the environment usable, so deletion can succeed successfully. So for the sake of making deletion reliable, IMHO CAPA should continue to reconcile the AWSCluster. Otherwise this could lead to even take longer for getting deleted and maybe produce more costs. Do we have numbers on how much it could save in terms of CAPA resources and AWS API calls? |
I don't think it's defined anywhere, it seems more like an oversight. But I don't see any downside of doing it this way, only the advantage of being more efficient.
I'll close this if everyone is against it. Please, would you take care of adding this to the contract so that developers know what's mandatory from infra providers? |
What type of PR is this?
/kind feature
What this PR does / why we need it:
When a
Cluster
CR is deleted, CAPA takes care of deleting the dependant CRs in an specific order, i.e. first the worker nodes, then the control plane, and finally the infra cluster CRAWSCluster
. Removing everything can take a little while, depending on the size of the cluster. While things are getting removed, theawscluster_controllerl
keeps reconciling theAWSCluster
, trying to keep the AWS resources such as the VPC or subnets up to date. But these resources will be removed shortly.With the changes on this PR, we are skipping the reconciliation of the
AWSCluster
when the ownerCluster
has been set for deletion. That way we skip reconciliation loops done on resources that are about to be removed, saving CAPA resources and AWS API calls.Special notes for your reviewer:
Checklist:
Release note: